package com.matt.domain.course;

import lombok.Data;

import javax.persistence.*;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2017/9/5
 * *******************************
 */
@Entity
@Table(name = "children_course")
@Data
public class ChildrenCourse {

    @Id
    @Column(columnDefinition = " varchar(32)  COMMENT ' id '")
    private String id;

    @Column(columnDefinition = " int DEFAULT 1 COMMENT '状态 1：待排课 2：进行中 3：待评测，4，待评估，5：待调整 6：已结束' ")
    private Integer status = 1;

    @Column(columnDefinition = " varchar(32)  COMMENT ' 对应宝宝id ' ")
    private String childrenId;

    @Column(columnDefinition = " int DEFAULT 0 COMMENT '课程总数' ")
    private Integer totalCourseSize = 0;

    @Column(columnDefinition = " int DEFAULT 0 COMMENT '结束课程数' ")
    private Integer overCourseSize = 0;

    @Column(columnDefinition = " int DEFAULT 0 COMMENT '课后评测完成课程数' ")
    private Integer evaluateCourseSize = 0;

    @Column(columnDefinition = " int DEFAULT 0 COMMENT '请假课程数' ")
    private Integer leaveCourseSize = 0;

    @Column(columnDefinition = " int DEFAULT 0 COMMENT '旷课课程数' ")
    private Integer skipCourseSize = 0;


    public static ChildrenCourse of(String childrenId){
        ChildrenCourse childrenCourse = new ChildrenCourse();
        childrenCourse.setId(childrenId);
        childrenCourse.setChildrenId(childrenId);
        return childrenCourse;
    }
}
